Skip to content

fleet session bind --force: replace a dead worktree binding in place - #14611

Open
dezren39 wants to merge 1 commit into
mainfrom
oc-code-07/14454-bind-force
Open

dezren39 wants to merge 1 commit into
mainfrom
oc-code-07/14454-bind-force

Conversation

@dezren39

@dezren39 dezren39 commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

Part of #14454.

A .fleet-session-id marker naming an ended session blocks every Fleet domain invocation from that worktree (main.rs dispatcher fails closed before the domain runs), and bare fleet session bind cannot self-heal — resolution fails before anything is persisted.

This slice adds --force to fleet session bind: it removes the worktree marker without validating it, then resolves normally (rebinds a supplied/env identity, else unattributed). Explicit flag rather than auto-clear on bare bind, because a liveness check answers false for unverifiable sessions too (unreachable server; connect builds without the probe) — only the operator asserts the binding is dead.

Evidence

  • New oracle tests: force_clears_before_resolving_and_rebinds_the_supplied_identity, stale_marker_still_fails_closed_without_force_and_clear_is_not_run, force_clear_failure_blocks_session_initialization, clear_marker_at_removes_the_marker_and_ignores_a_missing_one, plus strict parser cases. cargo test -p fleet --bin fleet: 142 passed, 0 failed.
  • Live binary check in a scratch worktree with a stale marker: fleet queue list died with the exact issue error (stale .fleet-session-id refers to ended or unverifiable session ...); after fleet session bind --force (exit 0, marker gone) the same call reached the broker and listed tasks. --force --session-id <live> rewrote the marker in place.
  • Docs: USAGE, pkgs/fleet/book/reference/builtins.md, pkgs/fleet/README.md impl(fleet): session state — session id in env + worktree pwd-file #9075 section. TS hosted transcription untouched (resolver semantics unchanged; --force is CLI-layer, no hosted bind CLI exists).

Worker does not merge. The hatch-side marker still needs fleet session bind --force (or rm .fleet-session-id) run on that machine after this lands.


Proof this PR
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

A marker naming an ended session blocks every domain invocation from
that worktree, and bare bind cannot self-heal: resolution fails before
anything is persisted. --force removes the marker without validating
it, then resolves normally, so the worktree unblocks in one command.

Part of #14454
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd57bcf4-99ad-4414-bfec-4140d9d58564
Commits

Reviewing files that changed from the base of the PR and between 6570613 and e477ceb.

Files selected for processing: 3

  • pkgs/fleet/README.md
  • pkgs/fleet/book/reference/builtins.md
  • pkgs/fleet/crates/fleet/src/session_state.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant